﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Adminitrator.master" AutoEventWireup="true" CodeFile="ProductOrder.aspx.cs" Inherits="admin_Report_ProductOrder" %>

<%@ Register Src="~/admin/Report.ascx" TagName="LinkReport" TagPrefix="uc" %>
<%@ Import Namespace="DAL" %>
<script runat="server">
  DigitalColorCMSDataContext db = new DigitalColorCMSDataContext(BLL._Global.StringConnect);
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
  <uc:LinkReport ID="LinkReport1" runat="server" />
  <h1 class="title">Sản phẩm xem nhiều</h1>
  <div style="margin: 10px">
      <table cellpadding="3" cellspacing="0" style="width: 100%; border-collapse:collapse">
      <tr style="background: #999999; color: WHITE">
        <td>STT</td>
        <td>Tên sản phẩm</td>
        <td>Mã sản phẩm</td>
        <td>Giá</td>
        <td>Số lượng hiện tại</td>
        <td>Tổng số lượt xem</td>
        <td>Số lượng bán</td>
      </tr>
      <%
        var list = db.ReportProductOrder();
        int i =1;
        foreach (var item in list)
        {
          %>
            <tr>
             <td><%=i.ToString() %></td>
              <td><%=item.Name %></td>
              <td><%=item.IdProduct.ToString() %></td>
              <td><%=(item.Cost == null?"":String.Format("{0:0,0}",item.Cost)) %></td>
              <td><%=item.Quantity.ToString() %></td>
              <td><%=item.View.ToString() %></td>
               <td><%=item.Total.ToString() %></td>
            </tr>
          <%
            i++;
        }
         %>
    </table>
  </div>
</asp:Content>


